package souhu;

import java.util.Scanner;

/**
 * Description：
 * Author: zhangc
 * Date：2017/9/17 19:23
 */
public class Path {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next().trim().replaceAll("//", "/");
        String realPath = getRealPath(str);
        System.out.println(realPath);
    }

    public static String getRealPath(String string) {
        StringBuilder stringBuilder = new StringBuilder(string);
        for (int i = 0; i < stringBuilder.length() - 3; i++) {
            if (stringBuilder.charAt(i) == '.' && stringBuilder.charAt(i + 1) == '/') {
                if (i > 0 && stringBuilder.charAt(i - 1) != '.') {
                    stringBuilder.delete(i, i + 2);
                    i -= 1;
                    continue;
                } else {
                    stringBuilder.delete(i - 3, i + 2);
                    i -= 3;
                    continue;
                }
            }
        }
        stringBuilder.deleteCharAt(stringBuilder.length() - 1);
        return stringBuilder.toString();
    }

}
